3ea48786a6c8f02e0cf3c1f37a9762835f4fed30,platform/platform-api/src/com/intellij/util/io/HttpRequests.java,HttpRequests,createErrorMessage,#IOException#Request#,94
Before Change
@NotNull
public static String createErrorMessage(@NotNull IOException e, @NotNull Request request) throws IOException {
URLConnection connection = request.getConnection();
String errorMessage = "Cannot download '" + connection.getURL().toExternalForm() + "': " + e.getMessage() + "\n, headers: " + connection.getHeaderFields();
if (connection instanceof HttpURLConnection) {
HttpURLConnection httpConnection = (HttpURLConnection)connection;
errorMessage += "\n, response: " + httpConnection.getResponseCode() + ' ' + httpConnection.getResponseMessage();
}
return errorMessage;
}
static <T> T wrapAndProcess(RequestBuilder builder, RequestProcessor<T> processor) throws IOException {
After Change
StringBuilder builder = new StringBuilder();
builder.append("Cannot download '").append(connection.getURL().toExternalForm()).append("': ").append(e.getMessage());
if (includeHeaders) {
builder.append("\n, headers: ").append(connection.getHeaderFields());
}
if (connection instanceof HttpURLConnection) {
HttpURLConnection httpConnection = (HttpURLConnection)connection;